package modellayer;

import java.util.ArrayList;

public class LoanContainer
{
	private static LoanContainer instance;
	private ArrayList<Loan> loans;
	
	/**
	 * Instantiates a new loan container.
	 */
	public LoanContainer()
	{
		loans = new ArrayList<Loan>();
	}
	
	/**
	*Singleton method
	*/
	public static LoanContainer getInstance()
	{
		if(instance == null)
		{
			instance = new LoanContainer();
		}
		return instance;
	}
	
	/**
	 * @param l Loan	
	 */
	public void addLoan(Loan l)
	{
		loans.add(l);
	}
	
	
	/**
	 * @param l Loan
	 */
	public void deleteLoan(Loan l)
	{
		loans.remove(l);
	}
}